-
Notifications
You must be signed in to change notification settings - Fork 408
perf: Improve consolidation performance by adding a scheduling simulation cache #2096
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: rschalo The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Pull Request Test Coverage Report for Build 14045879893Details
💛 - Coveralls |
|
/assign @jmdeal |
|
|
||
| // StateNodeLabelRequirements returns the scheduling requirements for the state nodes labels. This is safe to cache | ||
| // as we don't modify these requirements and the state nodes won't change during a consolidation pass. | ||
| func (c *SimulationCache) StateNodeLabelRequirements(n *state.StateNode) scheduling.RequirementsReadOnly { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused: We pass a scheduler cache into our scheduler, but this scheduler cache only stores data from a single node?
| return np.Name, corev1.ResourceList(np.Spec.Limits) | ||
| }), | ||
| clock: clock, | ||
| cache: cache, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that we already have a pod cache -- does it make sense to share this cache across both node requirements and pod requirements so that we keep a single cache and just have different data in it?
|
/assign @jonathan-innis |
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
We are having issues with consolidating nodes in a large EKS cluster (>1000 nodes). |
Fixes #N/A
Description
Improve the performance of single-node consolidation by caching requirements.
How was this change tested?
Two deployments were applied to a cluster with pod anti-affinity rules selecting for self and topology key: hostname. The deployments also had requests that would fit two pods per node and after scaling to 1000 replicas, the result is 1000 dataplane nodes. These are the results of how many candidates can be considered for multi- and single-node consolidations.
Two deployments like:
NodePool:
KWOKNodeClass
All other consolidation methods disabled except for the one being tested, Karpenter pod with 1cpu-1gb was used:
In single-node consolidation by ~65% averaged across three runs:
before
after
No OOMing with 1cpu-1gb

In multi-node consolidation by ~38% averaged across five runs:
before
after
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.